import request from '@/utils/request'


export default {
  getList() {
    return request({
      url: '/Admin/user/list',
      method: 'get',

      // ==============mmm 
    })
  },

  getListByPage(current,limit){
    return request({
      url:  `/Admin/user/list/${current}/${limit}`,
      method: 'get',
    })
  },
  // 按条件查询用户
  getListBytt(data) {
    return request({
      url: '/Admin/user/list',
      method: 'post',
      data
    })
  },


  //根据id查找用户
  getUserById(id){
    return request({
      url: `/Admin/user/getUserById/${id}`,
      method: 'get',
    })
  },

  //根据id删除用户
  handleDelete(data) {
    return request({
      url: '/Admin/user/delete',
      method: 'post',
      data
    })
  },

  //添加用户
  addUser(data) {
    return request({
      url: '/Admin/user/add',
      method: 'post',
      data
    })
  },
  //订单查询
  getOrderByPage(current,limit){
    return request({
      url:  `/Admin/user/Order/${current}/${limit}`,
      method: 'get',
    })
  },
  //设置订单状态
  setOrderStatus(id,sta){
    return request({
      url:  `/Admin/user/Status/${id}/${sta}`,
      method: 'get',
    })
  }

}